import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './App.vue';
import HmFind from './components/HmFind.vue';
import HmFriend from './components/HmFriend.vue';
import HmMy from './components/HmMy.vue';
Vue.config.productionTip = false


Vue.use(VueRouter)
const router = new VueRouter({
  routes: [
    // 重定向 
    { path: '/find' ,component: HmFind },
    { path: '/my', component: HmMy},
    {
      path: '/friend',
      component: HmFriend,
      children: [
        { path: 'child1', component: () => import('./components/FriendChild1.vue') },
        { path: 'child2', component: () => import('./components/FriendChild2.vue') },
        { path: 'child3', component: () => import('./components/FriendChild3.vue') },
      ]
    },

  ]
})
new Vue({
  render: h => h(App),
  router: router
}).$mount('#app')
